import {request} from '@/sheep/request';

export default {
    // 宠物洗澡预下单
  createOrder:(data)=>
    request({
      url: '/shop/api/pet/order/createOrder',
      method: 'POST',
      data,
      custom: {
        showLoading: false,
        auth: true,
      },
    }),
    // 宠物洗澡订单列表
  orderList:(data)=>
    request({
      url: '/shop/api/pet/order/orderList',
      method: 'GET',
      data,
      custom: {
        showLoading: false,
        auth: true,
      },
    }),

  // 宠物洗护订单列表
  washList:(data)=>
    request({
      url: '/shop/api/pet/order/washList',
      method: 'GET',
      data,
      custom: {
        showLoading: false,
        auth: true,
      },
    }),

    // 宠物洗澡订单详情
  orderDetails:(data)=>
    request({
      url: '/shop/api/pet/order/orderDetails',
      method: 'GET',
      data,
      custom: {
        showLoading: false,
        auth: true,
      },
    }),
  // 宠物洗澡配置
  getSettings:(data)=>
    request({
      url: '/shop/api/pet/order/getSettings',
      method: 'GET',
      data,
      custom: {
        showError:false,
        showLoading: false,
        auth: false,
      },
    }),
	getSettingsNew:(data)=>
	  request({
	    url: '/shop/api/pet/order/getSettingsNew',
	    method: 'GET',
	    data,
	    custom: {
	      showError:false,
	      showLoading: false,
	      auth: false,
	    },
	  }),
  // 获取机器信息
getMachineInfo:(data)=>
    request({
      url: '/shop/api/pet/order/getMachineInfo',
      method: 'GET',
      data,
      custom: {
        showLoading: false,
        auth: false,
      },
    }),
  // 打开机器门
openMachine:(data)=>
  request({
    url: '/shop/api/pet/order/openMachine',
    method: 'GET',
    data,
    custom: {
      showLoading: true,
      auth: true,
    },
  }),
    // 取消预约
cancelReserveOrder:(data)=>
  request({
    url: '/shop/api/pet/order/cancelReserveOrder',
    method: 'POST',
    data,
    custom: {
      showLoading: true,
      auth: true,
    },
  }),
  // 检查预约
findReserveOrder:(data)=>
  request({
    url: '/shop/api/pet/order/findReserveOrder',
    method: 'GET',
    data,
    custom: {
      showLoading: true,
      auth: true,
    },
  }),
};
